package xyz.zcxsythenew.msec

import java.io.InputStream
import java.io.InputStreamReader

object StreamToString {
    fun readStream(stream: InputStream) : String {
        val reader = InputStreamReader(stream, "UTF-8")
        var str = reader.readText()
        var res = ""
        while (str != "") {
            res += str
            str = reader.readText()
        }
        return res
    }
}